package net.sk.china.city.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class ArInventoryVO {
    /** 库存id */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 库存 */
    private Integer inventory;

    /** 时间段 */
    private String timeSlot;

    /** 商品id */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long productId;

    /** 规格包括尺码、颜色 */
    private SpecificationsVO specification;

    /** 时间区间 */
    private String timeInterval;

    /** 积分价值 */
    private BigDecimal integratedWorth;

    /** 商品编码 */
    private String proCode;

    /** 商品名称 */
    private String productName;

    /** 捐赠来源名称列表 */
    private List<String> sourceNames;

    /** 入库人名称 */
    private String createBy;

    /** 入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;

    /** 出库人名称 */
    private String updateBy;

    /** 出库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date updateTime;

    /** 出库数量 */
    private Integer outboundNumber;

    /** 出库原因 */
    private String outboundReason;

    public void setSpecification(String color,String size,String specifications){
        specification.setColor(color);
        specification.setSize(size);
        specification.setSpecifications(specifications);
    }

    public ArInventoryVO(){
        specification = new SpecificationsVO();
    }

    public String getColor(){
        return specification.getColor();
    }

    public String getSize(){
        return specification.getSize();
    }

    public String getSpecifications(){
        return specification.getSpecifications();
    }
}

